Optimal. Leaf size=48 \[ -\frac {a^2 \log (\cos (e+f x))}{f}+\frac {a b \sec ^2(e+f x)}{f}+\frac {b^2 \sec ^4(e+f x)}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4138, 266, 43} \[ -\frac {a^2 \log (\cos (e+f x))}{f}+\frac {a b \sec ^2(e+f x)}{f}+\frac {b^2 \sec ^4(e+f x)}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 266
Rule 4138
Rubi steps
\begin {align*} \int \left (a+b \sec ^2(e+f x)\right )^2 \tan (e+f x) \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {\left (b+a x^2\right )^2}{x^5} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {(b+a x)^2}{x^3} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac {\operatorname {Subst}\left (\int \left (\frac {b^2}{x^3}+\frac {2 a b}{x^2}+\frac {a^2}{x}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac {a^2 \log (\cos (e+f x))}{f}+\frac {a b \sec ^2(e+f x)}{f}+\frac {b^2 \sec ^4(e+f x)}{4 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.11, size = 82, normalized size = 1.71 \[ -\frac {\sec ^4(e+f x) \left (a \cos ^2(e+f x)+b\right )^2 \left (4 a^2 \cos ^4(e+f x) \log (\cos (e+f x))-4 a b \cos ^2(e+f x)-b^2\right )}{f (a \cos (2 (e+f x))+a+2 b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 53, normalized size = 1.10 \[ -\frac {4 \, a^{2} \cos \left (f x + e\right )^{4} \log \left (-\cos \left (f x + e\right )\right ) - 4 \, a b \cos \left (f x + e\right )^{2} - b^{2}}{4 \, f \cos \left (f x + e\right )^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.34, size = 46, normalized size = 0.96 \[ \frac {b^{2} \left (\sec ^{4}\left (f x +e \right )\right )}{4 f}+\frac {a b \left (\sec ^{2}\left (f x +e \right )\right )}{f}+\frac {a^{2} \ln \left (\sec \left (f x +e \right )\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 67, normalized size = 1.40 \[ -\frac {2 \, a^{2} \log \left (\sin \left (f x + e\right )^{2} - 1\right ) + \frac {4 \, a b \sin \left (f x + e\right )^{2} - 4 \, a b - b^{2}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1}}{4 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.50, size = 61, normalized size = 1.27 \[ \frac {a^2\,\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f}-\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {b^2}{2}-b\,\left (a+b\right )\right )}{f}+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^4}{4\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.67, size = 61, normalized size = 1.27 \[ \begin {cases} \frac {a^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a b \sec ^{2}{\left (e + f x \right )}}{f} + \frac {b^{2} \sec ^{4}{\left (e + f x \right )}}{4 f} & \text {for}\: f \neq 0 \\x \left (a + b \sec ^{2}{\relax (e )}\right )^{2} \tan {\relax (e )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________